//---------------------------------------------------------------------------

//#include <vcl.h>
#pragma hdrstop
#include "stdafx.h"


#include "FControlPanel.h"
#include "FMainWnd.h"
#include "CSettings.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TControlPanel *ControlPanel;
extern CSettings           *ps;
//---------------------------------------------------------------------------
__fastcall TControlPanel::TControlPanel(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TControlPanel::BB_MainExitClick(TObject *Sender)
{
    MainWnd->BB_MainExitClick(Sender);
}
//---------------------------------------------------------------------------
void __fastcall TControlPanel::BB_StopClick(TObject *Sender)
{
    MainWnd->BB_StopClick(Sender);
}
//---------------------------------------------------------------------------
void __fastcall TControlPanel::FormShow(TObject *Sender)
{
   Left = ps->msp.RectControlPanel.Left;
   Top =  ps->msp.RectControlPanel.Top;
}
//---------------------------------------------------------------------------

void __fastcall TControlPanel::FormClose(TObject *Sender,
      TCloseAction &Action)
{
  if (ps!=NULL)
  {
    ps->msp.RectControlPanel.Left = Left;
    ps->msp.RectControlPanel.Top = Top;
  }
}
//---------------------------------------------------------------------------

void __fastcall TControlPanel::FormHide(TObject *Sender)
{
   if (ps!=NULL)
   {
      ps->msp.RectControlPanel.Left = Left;
      ps->msp.RectControlPanel.Top = Top;
   }
}
//---------------------------------------------------------------------------

